ulong my_lseek(int fd, ulong position)
{
	ulong originalPos = openFiles[fd].offset;
	if (position <= openFiles[fd].memInode->inode.i_size)
		runningProc->files[fd]->offset = position;
	else
		printf("Specified position is out of bounds of the file\n");
	return originalPos;
}

int do_lseek(char* notUsed)
{
	int fd = 0;
	ulong bytesToSeek = 0;
	
	printf("Enter FD to lseek: ");
	scanf("%d", &fd);
	
	if (runningProc->files[fd] == 0)
	{
		printf("Specified FD does not exist\n");
		return -1;
	}
	
	printf("Enter byte offset to lseek: ");
	scanf("%ld", &bytesToSeek);
	
	my_lseek(fd, bytesToSeek);
	
	putchar('\n');
	getchar();
	return 1;
}
